//
//  MyConnection.h
//  婚礼记
//
//  Created by 月月 on 15/4/6.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//
//#define HTTP @"http://m.yidoutang.com/api/case/list"
//#define details @"http://m.yidoutang.com/api/case/detail"

@protocol MyConnectionDelegate <NSObject>

- (void)receiveDataFinished:(NSData *)data type:(NSInteger)type;

@end


@interface MyConnection : NSObject<NSURLConnectionDataDelegate, NSURLConnectionDelegate, UIAlertViewDelegate>

@property (nonatomic, copy) NSString *requestUrl;

@property (nonatomic, assign) id<MyConnectionDelegate>delegate;
@property (nonatomic, assign) NSInteger myType;
@property (nonatomic, retain) NSMutableData *receiveData;


+ (void)connectWithUrl:(NSString *)urlStr parmaters:(NSDictionary *)parmaters delegate:(id<MyConnectionDelegate>) delegate type:(NSInteger)type;

- (void)startWithUrl:(NSString *)urlStr parmaters:(NSDictionary *)parmaters;


@end